#ifndef MY_VAR_STORE
#define MY_VAR_STORE

#define uint8 unsigned char

#define BUFFERSIZE 8*1024*1024
#define RIGHTSIZE  5*1024*1024
#define PATH "RyoRO.exe"
//#define checkval 0x21221B8B
#define checkval 0x21221C29
#define CMAX 8
#define krow 4
#define kcol 5
#define REM_SIZE 16
#define PAS_PKG_SIZE 8
#define PAS_SIZE 6
#define HAS_LEN 18
#define RyoRoSec "RyoRoSec.dat"
#define SEC_LEN 32
#define PAS_SEC_LEN 4
#define aKey 16
#define hKey 16

//========== SYSTEM HOOK START==============//
HHOOK		g_hHook			=	NULL;
//========== SYSTEM HOOK   END==============//

//========== FILE AUTH START================//
bool		Authk			=	false;
unsigned char		SecString[SEC_LEN*2];
//========== FILE AUTH   END================//

//========== SHARE MEMORY START=============//
HANDLE		pMap			=	NULL;
LPVOID		pBuf			=	NULL;
//========== SHARE MEMORY   END=============//

//========== WS32 HOOK START   =============//
bool		HOOKSUC			=	true;


BYTE		Original_send[CMAX];
BYTE		Original_recv[CMAX];
BYTE		Jump_send[CMAX] = {0xB8,0x00,0x00,0x40,0x00,0xFF,0xE0,0x00};
BYTE		Jump_recv[CMAX] = {0xB8,0x00,0x00,0x40,0x00,0xFF,0xE0,0x00};
LPVOID		org_send;
LPVOID		org_recv;
LPVOID		rem_data;

unsigned int lgid1,lgid2;
//========== WS32 HOOK   END   =============//

//========== KEY LOCKED & UNLOCK =============//
static unsigned short keyarray[krow][kcol] = {
							{123,456,789,346,214},
							{435,768,872,335,512},
							{193,233,213,582,301},
							{141,339,109,224,921}
						   };
static unsigned short keyarray2[krow][kcol] = {
										{0x3419,0x1440,0x4189,0x9226,0xa723},
										{0xb31c,0x1c17,0xc372,0xe319,0x5542},
										{0xbb13,0xa7f1,0x1ac3,0x3cb2,0xcc41},
										{0xa31a,0xcf1a,0xe317,0xa2c4,0x6741}
									  };
const unsigned char addkey[aKey] = {0x12, 0x21, 0x33, 0x45, 0xab, 0x11, 0x22, 0x91, 0x3c, 0xcd, 0x1f, 0xde, 0x9e, 0x76, 0x59, 0xea};
const unsigned char hashkey[hKey] = {0x31, 0x17, 0x23, 0x29, 0x1a, 0x3c, 0x0a, 0x2e, 0x1e, 0x20, 0x27, 0x19, 0x33, 0x09, 0x37, 0x15};

//========== KEY LOCKED & UNLOCK =============//

//========== Ryo Ro Exe buff     =============//
static char RYOROEXE[BUFFERSIZE];
//========== Ryo Ro Exe buff     =============//

class MyHookSocket {
	public:
		MyHookSocket();
};

MyHookSocket myhook;

#endif

/*
#define NAME_LENGTH (23+1)
#define PASS_LENGTH (23+1)
#define PAG_LEN 73
#define ACK_LEN 6
#define ACC_POS 24
#define PAS_POS 48
#define ROW_POS 0
#define COL_POS 5
#define CHK_POS 1
#define LN1 L"RyoRO.exe"
#define LN2 L"RyoRoMod.exe"
typedef int (WSAAPI winsend)(SOCKET,const char*,int,int);
typedef int (WSAAPI winrecv)(SOCKET,char*,int,int);

*/